package com.moefor.clover.model;

import java.awt.Point;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;

import com.moefor.clover.model.element.MapPoint;

@Entity
public class Market extends BaseEntity{
	@Column(nullable = false)
	private String name;
	
	@ManyToMany(fetch = FetchType.LAZY, cascade = {CascadeType.ALL})
	private Set<Goods> goodsItems;
	
	@Column(nullable = false)
	private String introduction;
	
	@Column
	private String avatorUrl;
	
	@Column(nullable = false)
	private MapPoint location;

	public MapPoint getLocation() {
		return location;
	}

	public void setLocation(MapPoint location) {
		this.location = location;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getAvatorUrl() {
		return avatorUrl;
	}

	public void setAvatorUrl(String avatorUrl) {
		this.avatorUrl = avatorUrl;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<Goods> getGoodsItems() {
		return goodsItems;
	}

	public void setGoodsItems(Set<Goods> goodsItems) {
		this.goodsItems = goodsItems;
	}
}
